package zuk.clipvuiviet;

import java.io.IOException;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;

public class GetDataFromUrl {

	public String getData(String url) {
		String data = null;
		try {
			HttpGet get = new HttpGet("http://fbphoto-project.googlecode.com/files/data_clipvui.zuk");
			HttpResponse response = new DefaultHttpClient().execute(get);
			data = EntityUtils.toString(response.getEntity());
		} catch (ClientProtocolException e) {
			e.printStackTrace();
			return null;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
		return data;
	}
}
